/*
 * @Description:邀请流程
 * @Author: iamsmiling
 * @Date: 2021-06-13 07:57:53
 * @LastEditTime: 2021-06-13 09:17:02
 */

import 'package:credit_business_circle/R/R.dart';
import 'package:credit_business_circle/routes/app_routes.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

class InvitationStepCard extends StatelessWidget {
  const InvitationStepCard({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.only(left: R.dimen.dp13, right: R.dimen.dp13, top: 0),
      alignment: Alignment.center,
      padding: EdgeInsets.only(
          left: R.dimen.dp18, right: R.dimen.dp18, bottom: R.dimen.dp32),
      decoration: BoxDecoration(
          color: R.color.fffff9ef,
          borderRadius: BorderRadius.circular(R.dimen.sp12)),
      child: Stack(
        alignment: AlignmentDirectional.center,
        children: [
          Column(
            children: [
              Container(
                margin: EdgeInsets.only(top: R.dimen.dp45),
                child: DefaultTextStyle(
                  style: TextStyle(
                      color: R.color.ff332525, fontSize: R.dimen.sp12),
                  child: Row(
                    children: [
                      Expanded(
                          child: Column(
                        crossAxisAlignment: CrossAxisAlignment.center,
                        children: [
                          Image.asset(R.image.invitation),
                          Container(
                              margin: EdgeInsets.only(top: R.dimen.dp10),
                              child: Text(
                                "发送邀请码\n或链接给您好友",
                                textAlign: TextAlign.center,
                              ))
                        ],
                      )),
                      Expanded(
                          child: Column(
                        crossAxisAlignment: CrossAxisAlignment.center,
                        children: [
                          Image.asset(R.image.invitationRegister),
                          Container(
                              margin: EdgeInsets.only(top: R.dimen.dp10),
                              child: Text(
                                "好友通过邀请码\n或链接完成注册",
                                textAlign: TextAlign.center,
                              ))
                        ],
                      )),
                      Expanded(
                          child: Column(
                        crossAxisAlignment: CrossAxisAlignment.center,
                        children: [
                          Image.asset(R.image.invitationPublish),
                          Container(
                              alignment: Alignment.center,
                              margin: EdgeInsets.only(top: R.dimen.dp10),
                              child: Text(
                                "好友登录APP并\n成功发布合作信息",
                                textAlign: TextAlign.center,
                              ))
                        ],
                      ))
                    ],
                  ),
                ),
              ),
              Container(
                margin: EdgeInsets.only(top: R.dimen.dp45),
                child: Row(
                  children: [
                    Expanded(
                        child: Column(
                      crossAxisAlignment: CrossAxisAlignment.start,
                      children: [
                        Text(
                          "邀请海报",
                          style: TextStyle(
                              fontWeight: FontWeight.w600,
                              fontSize: R.dimen.sp15,
                              color: R.color.ff111111),
                        ),
                        Container(
                          margin: EdgeInsets.only(top: R.dimen.dp8),
                          child: Text(
                            "生成你的专属海报，赶紧邀请好友吧",
                            style: TextStyle(
                                fontSize: R.dimen.sp12,
                                color: R.color.ff555555),
                          ),
                        )
                      ],
                    )),
                    GestureDetector(
                      onTap: () =>
                          Get.toNamed(Get.currentRoute + AppRoutes.poster),
                      child: Container(
                        padding: EdgeInsets.symmetric(
                            horizontal: R.dimen.dp10, vertical: R.dimen.dp6),
                        decoration: BoxDecoration(
                            color: R.color.ff0db0fc,
                            borderRadius: BorderRadius.circular(R.dimen.sp20)),
                        child: Text(
                          "立即生成",
                          style: TextStyle(
                              fontSize: R.dimen.sp13,
                              color: R.color.ffffffff,
                              fontWeight: FontWeight.w500),
                        ),
                      ),
                    )
                  ],
                ),
              ),
              Container(
                margin: EdgeInsets.only(top: R.dimen.dp40),
                child: Column(
                  children: [
                    Row(
                      children: [
                        Text(
                          "邀请码：    ",
                          style: TextStyle(
                              fontWeight: FontWeight.w600,
                              fontSize: R.dimen.sp15,
                              color: R.color.ff111111),
                        ),
                        Expanded(
                            child: Container(
                          margin: EdgeInsets.only(
                              left: R.dimen.dp25, right: R.dimen.dp12),
                          padding: EdgeInsets.symmetric(vertical: R.dimen.dp9),
                          alignment: Alignment.center,
                          decoration: BoxDecoration(
                              color: R.color.fff2f2f2,
                              borderRadius: BorderRadius.circular(R.dimen.sp3)),
                          child: Text(
                            "10026",
                            style: TextStyle(
                                fontSize: R.dimen.sp15,
                                color: R.color.ff111111,
                                fontWeight: FontWeight.w600),
                          ),
                        )),
                        Container(
                          padding: EdgeInsets.symmetric(
                              horizontal: R.dimen.dp20, vertical: R.dimen.dp6),
                          decoration: BoxDecoration(
                              color: R.color.ff0db0fc,
                              borderRadius:
                                  BorderRadius.circular(R.dimen.sp20)),
                          child: Text(
                            "复制",
                            style: TextStyle(
                                fontSize: R.dimen.sp13,
                                color: R.color.ffffffff,
                                fontWeight: FontWeight.w500),
                          ),
                        )
                      ],
                    ),
                    Container(
                      margin: EdgeInsets.only(top: R.dimen.dp20),
                      child: Row(
                        children: [
                          Text(
                            "邀请链接：",
                            style: TextStyle(
                                fontWeight: FontWeight.w600,
                                fontSize: R.dimen.sp15,
                                color: R.color.ff111111),
                          ),
                          Expanded(
                              child: Container(
                            margin: EdgeInsets.only(
                                left: R.dimen.dp25, right: R.dimen.dp12),
                            padding:
                                EdgeInsets.symmetric(vertical: R.dimen.dp9),
                            alignment: Alignment.center,
                            decoration: BoxDecoration(
                                color: R.color.fff2f2f2,
                                borderRadius:
                                    BorderRadius.circular(R.dimen.sp3)),
                            child: Text(
                              "http://www.xinshangq...",
                              style: TextStyle(
                                  fontSize: R.dimen.sp11,
                                  color: R.color.ff111111),
                            ),
                          )),
                          Container(
                            padding: EdgeInsets.symmetric(
                                horizontal: R.dimen.dp20,
                                vertical: R.dimen.dp6),
                            decoration: BoxDecoration(
                                color: R.color.ff0db0fc,
                                borderRadius:
                                    BorderRadius.circular(R.dimen.sp20)),
                            child: Text(
                              "复制",
                              style: TextStyle(
                                  fontSize: R.dimen.sp13,
                                  color: R.color.ffffffff,
                                  fontWeight: FontWeight.w500),
                            ),
                          )
                        ],
                      ),
                    )
                  ],
                ),
              ),
              Container(
                margin: EdgeInsets.only(top: R.dimen.dp30),
                child: DefaultTextStyle(
                  style: TextStyle(
                      fontSize: R.dimen.sp14, color: R.color.ff333333),
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.spaceAround,
                    children: [
                      Column(
                        children: [
                          Image.asset(R.image.wechatInvite),
                          Container(
                            margin: EdgeInsets.only(top: R.dimen.dp12),
                            child: Text("微信邀请"),
                          )
                        ],
                      ),
                      Column(
                        children: [
                          Image.asset(R.image.wechatMomentInvite),
                          Container(
                            margin: EdgeInsets.only(top: R.dimen.dp12),
                            child: Text("朋友圈邀请"),
                          )
                        ],
                      ),
                      Column(
                        children: [
                          Image.asset(R.image.qqInvite),
                          Container(
                            margin: EdgeInsets.only(top: R.dimen.dp12),
                            child: Text("QQ邀请"),
                          )
                        ],
                      )
                    ],
                  ),
                ),
              )
            ],
          ),
          Positioned(
              top: 0,
              child: Transform.translate(
                offset: Offset(0, -R.dimen.dp16),
                child: Stack(
                  alignment: AlignmentDirectional.center,
                  children: [
                    Image.asset(R.image.invitationHook),
                    Text(
                      "规则说明",
                      style: TextStyle(
                          fontSize: R.dimen.sp20,
                          color: R.color.ffffffff,
                          fontWeight: FontWeight.w600),
                    )
                  ],
                ),
              )),
        ],
      ),
    );
  }
}
